function fig2( )
%FIG2 Summary of this function goes here
%   Detailed explanation goes here
global f2;
global h2Edit2;
global h2Edit3;
global h2Edit4;
global h2Edit5;
global h2Edit6;

delta_x=150;
delta_y=150;
%-----------------------------------------------
    h=gcf;   
    f2 = figure('Visible','on','Position',[200-delta_x,200-delta_y,550+delta_x,285+delta_y], 'ToolBar','figure'); 
    h2 = axes('Units','Pixels','Position',[50,22,400+delta_x,230+delta_y]);

    lighting phong             % model o�wietleniainne opcje: flat, gouraud, none
    shading interp             % cieniowanieinne opcje: flat,faceted  , interp
    light('Position',[-50 -50 120]);
    
    hold on;                   % add to existing figure
    
    % plot3(X,Y,Z,'black.');
    
    axis([0 100 0 100 0 400]);
    caxis([0 400]);
    colorbar( 'location','EastOutside');      % color scale bar on rigth side, outside figure
    
    view(-10,30);
    
    h2Wait = uicontrol('Style','pushbutton','Position',[461+delta_x,228+delta_y,70,25],'String','Pause',...
    'Callback',{@buttonWait_Callback});
    h2Resume = uicontrol('Style','pushbutton','Position',[461+delta_x,198+delta_y,70,25],'String','Resume',...
    'Callback',{@buttonResume_Callback});
    h2Pop1 = uicontrol('Style', 'popup','Position', [461+delta_x,160+delta_y,85,25],'String',...
    {'view(45,0)','view(0,60)','view(0,90)'},'Callback',{@popupPop1_Callback});

    h2Break = uicontrol('Style','pushbutton','Position',[461+delta_x,22,70,25],'String','Terminate',...
    'Callback',{@buttonBreak_Callback});
    h2Radio1 = uicontrol('Style','radio','Position',[200,255+delta_y,70,15],'String','Runnig');

    h2Text1 = uicontrol('Style','text','Position',[50,272+delta_y,52,15],'String','Loop#');
    h2Edit1 = uicontrol('Style','edit','max',1,'Position',[50,255+delta_y,51,15],'String','1');

    h2Text2 = uicontrol('Style','text','Position',[100,272+delta_y,52,15],'String','TotalE');
    h2Edit2 = uicontrol('Style','edit','max',1,'Position',[100,+255+delta_y,51,15],'String','0');


    h2Text3 = uicontrol('Style','text','Position',[150,272+delta_y,52,15],'String','#ofMsgs');
    h2Edit3 = uicontrol('Style','edit','max',1,'Position',[150,255+delta_y,51,15],'String','0');

    h2Edit4 = uicontrol('Style','edit','max',1,'Position',[461+delta_x,66,70,25],'String','0');
   
    h2Edit5 = uicontrol('Style','edit','max',1,'Position',[600,270+delta_y,51,15],'String','1');
    h2Edit6 = uicontrol('Style','edit','max',1,'Position',[650,270+delta_y,51,15],'String','2');
    
    set([f2,h2,h2Wait,h2Resume,h2Break,h2Radio1,h2Edit1, h2Text1,...
        h2Edit2, h2Text2, h2Edit3, h2Text3, h2Pop1],'Units','normalized');
   
    figure(h);

end

